#pragma once
#include "CDialog/CDialogBase.h"

class CDialogFrame :
    public CDialogBase
{
public:
    LRESULT OnCommand(UINT nNotify, UINT nID, HWND hWnd);

protected:

    dlg_msg LRESULT OnInitDialog(WPARAM wParam, LPARAM lParam);
    dlg_msg LRESULT OnTaskBarCreated(WPARAM wParam, LPARAM lParam);
    dlg_msg LRESULT OnClose(WPARAM wParam, LPARAM lParam);
    dlg_msg LRESULT OnRButtonUp(WPARAM wParam, LPARAM lParam);

    dlg_command LRESULT OnFileExit(UINT nNotify, UINT nID, HWND hWnd, UINT nStart, UINT nEnd);
    dlg_command LRESULT OnWindowShow(UINT nNotify, UINT nID, HWND hWnd, UINT nStart, UINT nEnd);
    dlg_command LRESULT OnRadioRange(UINT nNotify, UINT nID, HWND hWnd, UINT nStart, UINT nEnd);
    dlg_command LRESULT OnTrayIcon(WPARAM wParam, LPARAM lParam);

private:
    void ShowTrayIcon();
    void DeleteTrayIcon();
    VOID CreatePopMenu(int xPos, int yPos, bool isTop);
    bool ShowForeground(HWND hWnd);

private:
    HMENU m_hPopMenu = NULL;
    HMENU m_hMainMenu = NULL;

    DECLARE_DLG_MESSAGE_MAP()
};